probegh

pr_duration

Get a list of opened pull-requests durations

Activity as code

Below are the details and signature of the activity Python module.

Typeprobe
Modulechaosreliably.activities.gh.probes
Namepr_duration
Returnlist

Usage

JSON

{
  "name": "pr-duration",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosreliably.activities.gh.probes",
    "func": "pr_duration",
    "arguments": {
      "repo": ""
    }
  }
}

YAML

name: pr-duration
provider:
  arguments:
    repo: ""
  func: pr_duration
  module: chaosreliably.activities.gh.probes
  type: python
type: probe

Arguments

NameTypeDefaultRequiredTitleDescription
repostringYesRepository
basestring“main”NoBranch
windowstring“5d”NoWindowSelect PRs within the given time window only

Get a list of opened pull-requests durations.

If you don’t set a window (by setting window to None), then it returns the duration of all PRs that were ever opened in this repository. Otherwise, only return the durations for PRs that were opened or closed within that window.

The repo should be given as owner/repo and the window should be given as a pattern like this: <int>s|m|d|w (seconds, minutes, days, weeks).

Signature

def pr_duration(repo: str,
                base: str = 'main',
                window: Optional[str] = '5d',
                configuration: Dict[str, Dict[str, str]] = None,
                secrets: Dict[str, Dict[str, str]] = None) -> List[float]:
    pass